package com.iwunu.gateway.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.iwunu.gateway.entity.FLockUser;

import io.lettuce.core.dynamic.annotation.Param;

/**
 * @author kinfeng
 * @date 2021/3/18 10:00 AM
 * @desc
 */
@Repository
public interface FaceUserRepository extends JpaRepository<FLockUser, Long> , JpaSpecificationExecutor<FLockUser> {
	
	   @Query(value="select i from FLockUser i where i.id=:userId ")
	   FLockUser getFlackUserByUserId(@Param("userId") Long userId);
	    
	   @Query(value="select i from FLockUser i where i.phone=:phone ")
	   FLockUser getFlackUserByPhone(@Param("phone") String phone);  
}
